<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class RoleNoleModel extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $table='role_node';
    protected $guarded=[];


    //模型关联角色
    public function role(){
        return $this->belongsTo(RoleModel::class,'role_id');
    }
    //模型关联权限
    public function node(){
        return $this->belongsTo(NodeModel::class,'node_id');
    }
}
